package com.acme.task3;

public class Task3Arrays {
	public static void main(String[] args) {
		
		for (int i = 1; i <= 50; i++) {
			if(i%3 == 0) {
				System.out.println("Number " + i + " is divisible by 3");
			} else {
				System.out.println(i);	
			}
		}
		
		int n = 50;
		int[] arr = new int[n];
		for (int i = 0; i < arr.length; i++) {
			arr[i] = i+1;
		}
		System.out.println(avg(arr));
	}
	
	public static int sum(int[] array) {
		int s = 0;
		for (int i = 0; i < array.length; i++) {
			s += array[i];
		}
		return s;
	}
	
	public static double avg(int[] array) {
		return (double)(sum(array)) / array.length;
	}
}
